package xaj.scc.ast;

import com.sun.corba.se.spi.legacy.connection.GetEndPointInfoAgainException;

import polyglot.ext.jl.ast.Node_c;
import polyglot.util.CodeWriter;
import polyglot.util.Position;
import polyglot.visit.PrettyPrinter;

public class NumberOfPasses_c extends Node_c implements NumberOfPasses {

	private int value;
	
	public NumberOfPasses_c(Position pos, int value) {
		super(pos);
		this.value = value;
	}

	public int getNumber() {
		return value;
	}

	public NumberOfPasses setNumber(int number) {
		NumberOfPasses_c n = (NumberOfPasses_c) copy();
		n.value = number;
		return n;
	}

	public void prettyPrint(CodeWriter w, PrettyPrinter pp) {
		w.newline(4);
		w.begin(0);
		w.write("@numberOfPasses = " + value);
		w.end();
	}

	@Override
	public void accept(Visitor v) {
		v.visitNumberOfPasses(this);
		
	}
}
